package com.baize.minespace.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;


/**
* <p>
* 评论信息表
* </p>
*
* @author baize
* @since 2024-04-15
* @version ${cfg.version}
*/
@ApiModel(value = "Comments对象", description = "评论信息表")
@ToString
@Data
@Accessors(chain = true)
@TableName("Comments")
public class Comments implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 评论唯一标识符
     */
    @ApiModelProperty(value = "评论唯一标识符")
    @TableId(value = "id", type = IdType.AUTO)
    @TableField("id")
    private Integer id;
    /**
     * 外键，关联到文章元数据表
     */
    @ApiModelProperty(value = "外键，关联到文章元数据表")
    private Integer postId;
    /**
     * 外键，关联到用户表
     */
    @ApiModelProperty(value = "外键，关联到用户表")
    private Integer userId;
    /**
     * 评论内容
     */
    @ApiModelProperty(value = "评论内容")
    private String content;
    /**
     * 评论创建时间
     */
    @ApiModelProperty(value = "评论创建时间")
    private LocalDateTime createdAt;
}
